import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

//解构path模块resolve方法
import { resolve } from 'path'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      //@映射文件夹位置
      '@': resolve(__dirname, 'src'),
    },
  },
  //服务器相关配置
  server: {
    //端口号设置
    port: 5111,
  },
  css: {
    preprocessorOptions: {
      // 导入scss预编译程序
      scss: {
        additionalData: `@import "@/style/mixin.scss";`,
      },
    },
  },
})